package com.mf.feigin;

import com.mf.entity.request.user.CheckedCodeRequest;
import com.mf.result.Result;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: lmf
 * @Create: 2024/7/19 10:14
 * Description: 验证码服务
 */
@FeignClient(value = "java-auth-code-service")
public interface AuthCodeFeignService {
    /**
     * 验证码校验
     */
    @PostMapping("/api/notify/v1/checkedCode")
    Boolean checkedCode(@Valid @RequestBody CheckedCodeRequest checkedCodeRequest);

    /**
     * 删除验证码
     */
    @GetMapping("/api/notify/v1/deleteCode")
    // HttpServletRequest request,
    Result<Boolean> deleteCode(@RequestParam("type") String type);

}
